package com.team.easybuy.mapper;

import com.team.easybuy.entity.Car;
import com.team.easybuy.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {

    List<Product> selectAll();

    Product selectById(Integer id);

    List<Product> selectByCId(Integer id);

    List<Product> selectByCId123(Integer id);

    int addOne(Product product);

    int deleteById(Integer id);

    int updateByPro(Product product);

    int updateStock(@Param("id") Integer id, @Param("stock") Integer stock);

    void updateAddStock(@Param("id") Integer id, @Param("stock") Integer stock);

    Integer selectStock(Integer pId);
}